package com.eagle.support.helper;

import android.annotation.SuppressLint;
import android.app.Notification;
import android.app.Notification.Builder;
import android.content.Context;

import com.eagle.R;


public class NotificationHelper {
    @SuppressLint("NewApi")
    @SuppressWarnings("deprecation")
    public static synchronized Notification getCallingNotification(Context context) {
        Builder b = new Builder(context);
        b.setSmallIcon(R.mipmap.ic_launcher);
        b.setOngoing(true);
        b.setContentTitle(context.getString(R.string.videocall_incall_notification_title));
        b.setContentText(context.getString(R.string.videocall_incall_notification_text));
        b.setTicker(context.getString(R.string.videocall_incall_notification_title));

        if (android.os.Build.VERSION.SDK_INT > 15) {
            return b.build();
        } else {
            return b.getNotification();
        }
    }
}
